<#assign pageTitle = "直播详情" />
<#assign pageHeader>
	<script type="text/javascript" src="/static/libs/jquery/jquery.qrcode.min.js"></script>
	<script type="text/javascript" src="/static/js/comment/comment.js"></script>
	<script type="text/javascript" src="/static/js/parabola.js"></script>
	<script type="text/javascript" src="/static/js/live/live-view.js?v=1"></script>
</#assign>
<#assign pageContent>
<div id="aCoursesList" class="bg-fa of">
	<section class="live-info-banner mt25">
		<div class="container">
			<div class="clearfix ">
				<div class="fl w70">
					<div class="">
						<article class="l-info-pic-wrap">
							<img src="/static/qdxwx/img/live-infor-bg.jpg" class="pic">
							<section class="new-liv-infor-top">
								<div class="n-l-in-t-tit tac">
										<span class="vam mr30">
											<tt class="vam fsize14 f-fM c-fff">正在学习：</tt>
											<tt class="vam fsize14 f-fM light-yellow">${started}课时</tt>
											<tt class="vam fsize14 f-fM c-fff">/${videoNodeSize}课时</tt>
										</span>
									<span class="vam">
											<em class="vam icon16 time">&nbsp;</em>
											<#assign beginTime="${course.liveBeginTime?string('yyyy-MM-dd HH:mm:ss')}" />
											<#assign endTime="${course.liveEndTime?string('yyyy-MM-dd HH:mm:ss')}">

											<#if beginTime == endTime>
												<tt class="c-fff fsize14 f-fM vam">
													${course.liveBeginTime?string('yyyy-MM-dd HH:mm:ss')}
												</tt>
												<tt class="c-fff fsize14 f-fM vam">
                                                    ${course.liveBeginTime?string('yyyy-MM-dd HH:mm:ss')}
                                                    ${course.liveEndTime?string('yyyy-MM-dd HH:mm:ss')}
												</tt>
												<#else>
												<tt class="c-fff fsize14 f-fM vam">${course.liveBeginTime?datetime}</tt>

												<tt class="c-fff fsize14 f-fM vam">~</tt>

												<tt class="c-fff fsize14 f-fM vam ml5">${course.liveEndTime?datetime}</tt>
											</#if>
										</span>
								</div>
								<div class="n-l-in-t-boy">
									<p class="name">${course.courseName}</p>
									<a href="javascript:void(0)" onclick="nowLivePlay(${course.courseId})" title="${course.courseName}" class="btn tac">
										<img src="/static/qdxwx/img/l-in-l.gif" class="disIb">
									</a>
								</div>
							</section>
						</article>
					</div>
				</div>
				<div class="fr col-3">
					<section class="l-i-desc">
						<div class="l-i-box live-box-topr">
							<h2 class="l-i-title"> <span class="c-fff fsize20">${course.courseName}</span> </h2>
							<section class="mt20 hLh30">
								<span class="vam mr30 c-fff fsize14">价格：<tt class="c-red-live f-fG fsize24">￥${course.price/100}</tt></span>
								<span class="vam">
										<tt class="fsize14 c-fff vam f-fM">课时数：</tt>
										<tt class="fsize14 c-fff vam f-fM">${course.lessonNum}</tt>
									</span>
							</section>
							<section class="mt20">
								<#if serviceSwitch.member=='ON'&& memberTypes?? && memberTypes?size gt 0>
										<span class="c-in-vip ml10">
											<a href="/user/member.html" class="vam">
												<img src="/static/qdxwx/img/cou-xq-vip.png">
											</a>
											<div class="c-i-vip-br">
												<tt class="vam f-fM fsize12 c-999">该课程属于</tt>
												<tt class="vam f-fM fsize12 c-master">
													<#list memberTypes as memberType>
														${memberType.title}&nbsp;
													</#list>
												</tt>
												<tt class="vam f-fM fsize12 c-999">免费课程,了解更多会员信息，请点击下方立即加入VIP。</tt>
											</div>
											<div class="DT-arrow">
												<em>◆</em>
												<span>◆</span>
											</div>
										</span>
								</#if>
							</section>
							<section class="mt20 hLh30">
									<span class="c-fff fsize14">讲师：
									<#list teacherList as tea>
										${tea.name }&nbsp;&nbsp;&nbsp;
									</#list></span>
							</section>
							<section class="mt20 hLh30">
									<span class="c-fff fsize14">有效期：
										${course.liveEndTime?string('yyyy-MM-dd HH:mm:ss')}
									</span>
								</span>
							</section>
							<section class="mt20 hLh30">
									<span class="vam mr30">
										<em class="icon18 l-gms-ico">&nbsp;</em>
										<tt class="fsize14 c-fff vam f-fM">购买数：</tt>
										<tt class="fsize14 c-fff vam f-fM">${course.buyCount }</tt>
									</span>
								<span class="vam mr30">
										<em class="icon18 l-lls-ico">&nbsp;</em>
										<tt class="fsize14 c-fff vam f-fM">浏览数：</tt>
										<tt class="fsize14 c-fff vam f-fM">${course.viewCount }</tt>
									</span>
							</section>
							<section class="c-attr-mt of mt30">
								<#if (isFavorite??)?string == "true" >
									<a title="取消收藏" href="javascript:void(0)" class="vam sc-end" onclick="deleteFavorite(${course.courseId},this)"><em class="icon18 l-scIcon"></em><tt class="c-fff f-fM fsize14 ml5">取消收藏</tt></a>
								 <#else>
								 <a title="收藏" href="javascript:void(0)" class="vam" onclick="favorites(${course.courseId},this)"><em class="icon18 l-scIcon"></em><tt class="c-fff f-fM fsize14 ml5">收藏</tt></a>
								</#if>
							</section>
							<#assign  nowDate = .now />
							<div class="mt30 live-btn tac">

									<#if isBuy?string =="false" && (course.price > 0)>
										<a href="javascript:void(0)" id="cou-shopcar" title="购买" class="l-i-play l-i-play-jr" onclick="buyNow('${course.courseId}')">购买课程</a>
										<section class="ml15 disIb">
											<a class=" c-fff f-fM l-i-play l-i-play-ku" id="cou-shopcar" href="javascript:void(0)" onclick="addShoppingCart('${course.courseId}')">加入购物车</a>
											<div class="fly_item" id="flyItem">
												<img width="50" height="50" src="/static/qdxwx/img/avatar-boy.gif">
											</div>
										</section>
									<#else>
										<#if course.liveEndTime?datetime lt nowDate?datetime >
											<a href="javascript:void(0)" onclick="nowLivePlay(${course.courseId})" id="cou-shopcar" title="" class="l-i-play">
												已结束
											</a>
										</#if>
										<#if course.liveBeginTime?datetime lt nowDate?datetime && course.liveEndTime?datetime gt nowDate?datetime>
											<a href="javascript:void(0)" onclick="nowLivePlay(${course.courseId})" id="cou-shopcar" title="进入直播" class="l-i-play l-i-play-jr">
												进入直播
											</a>
										</#if>
										<#if course.liveBeginTime?datetime gt nowDate?datetime && course.liveEndTime?datetime gt nowDate?datetime>
											<a href="javascript:void(0)" onclick="nowLivePlay(${course.courseId})" id="cou-shopcar" title="即将开始" class="l-i-play-wks">
												即将开始
											</a>
										</#if>
							        </#if>
							</div>
						</div>
					</section>
				</div>
			</div>
		</div>
	</section>
	<div class="mt25 c-infor-box">
		<div class="container">
			<article class="fl w70">
				<section class="mr25">
					<div class="i-box cou-in-boc">
						<div  class="clearfix c-infor-tabTitle c-tab-title">
							<section class="fl" id="c-i-tabTitle">
								<a href="javascript: void(0)" onclick="selectCourseInfo('liveContext')" title="直播详情" class="current" >直播介绍</a>
								<a href="javascript: void(0)" onclick="selectCourseInfo('liveList')" title="直播课表" >直播课表</a>
								<a href="javascript: void(0)" onclick="selectCourseInfo('liveComment')" title="直播评论" >直播评论</a>
							</section>
						</div>
						<article class="ml10 mr10 live-infor-flbox">
							<div id="liveContext">
								<h6 class="c-i-content c-infor-title"> <span>简介</span> </h6>
								<#if course.context??>
									<div class="course-txt-body-wrap"> <section class="course-txt-body" >
										<p>${course.context}</p> </section>
									</div>
									<#else>
									<section class="no-data-wrap">
										<em class="icon30 no-data-ico">&nbsp;</em> <span class="c-666 fsize14 ml10 vam">没有相关数据，小编正在努力整理中...</span>
									</section>
								</#if>
							</div>
							<div class="ml10 liveList-coures" id="liveList" style="display: none;">
								<h6 class="c-g-content c-infor-title"> <span>直播课表</span> </h6>
								<#if !courseNodeTree??>
									<section class="no-data-wrap">
										<em class="icon30 no-data-ico">&nbsp;</em> <span class="c-666 fsize14 ml10 vam">没有相关数据，小编正在努力整理中...</span>
									</section>
								<#else>
								<menu id="lh-menu" class="lh-menu">
									<ul>
										<#list courseNodeTree as parentNode>

											<#if parentNode.nodeType==0>
												<li class="lh-menu-stair">
													<a class="l-m-stitle current-1" href="javascript:livePlay(${parentNode.nodeId})" title="${parentNode.name}">

                                                        <span class="fr">
                                                            <em class="icon16 m-tree-icon">&nbsp;</em>
                                                        </span>

															${parentNode.name}
													</a>
													<ol class="lh-menu-ol" >
															<!--父级节点下的子节点-->
														<#list parentNode.children as childNode>
															<!--开始时间小于当前时间结束时间大于当前时间 为正在直播-->
															<#if childNode.liveBeginTime?long lt .now?long && childNode.liveEndTime?long gt .now?long>

																<li class="lh-menu-second">
																	<div class="l-m-stitle clearfix">
                                                                        <span class="fr">
                                                                                <a class="cou-kscp" href="javascript:livePlay(${childNode.nodeId})"  title="进入直播">进入直播</a>
                                                                        </span>
																		<span class="fr mr20">
                                                                            <img src="/static/qdxwx/img/live-ing.gif" width="100%" height="100%" class="vam disIb">
                                                                        </span>
																		<a class="cou-tit-txt" href="javascript:livePlay(${childNode.nodeId})" title="${childNode.name}" >${childNode.name}</a>
																	</div>
																</li>
															</#if>
															<!--开始时间大于当前时间 为未开始直播-->
															<#if childNode.liveBeginTime?long gt .now?long>
																<li class="lh-menu-second">
																	<div class="l-m-stitle clearfix">
                                                                        <span class="fr">
                                                                        <#assign after15min=(.now?long+900000)/>
                                                                            <#if after15min < childNode.liveBeginTime?long>
																				<a  class="cou-kscp gmkc" href="javascript:void(0)" title="未开始">&nbsp;未&nbsp;开&nbsp;始</a><!--点击弹出提示 开播之前15分钟可以进入-->
																			 <#else>
																			 <a  class="cou-kscp" href="javascript:livePlay(${childNode.nodeId})" title="马上开始">马上开始</a><!--开播之前15分钟后按钮变色-->
																			</#if>
                                                                            </span>
																		<span class="fr mr20">
                                                                            <tt class="vam fsize12 f-fM c-master">
                                                                                ${childNode.liveBeginTime?string('yyyy-MM-dd HH:mm:ss')}&nbsp;~&nbsp;${childNode.liveEndTime?string('yyyy-MM-dd HH:mm:ss')}
                                                                             </tt>
                                                                        </span>
																		<a class="cou-tit-txt" title="${childNode.name}" onclick="" href="javascript:livePlay(${childNode.nodeId})">${childNode.name}</a>
																	</div>
																</li>
															</#if>
															<!--结束时间大于当前时间 为结束直播-->

															<#if childNode.liveEndTime?long lt .now?long >
																<li class="lh-menu-second">
																	<div class="l-m-stitle clearfix">
                                                                        <span class="fr">
                                                                            <a  class="cou-kscp" href="javascript:livePlay(${childNode.nodeId})"  title="查看回放">查看回放</a>
                                                                        </span>
																		<span class="fr mr20">
                                                                            <tt class="vam fsize12 f-fM c-666">
                                                                                ${childNode.liveBeginTime?string('yyyy-MM-dd HH:mm:ss')} ~&nbsp;${childNode.liveEndTime?string('yyyy-MM-dd HH:mm:ss')}
                                                                            </tt>
                                                                        </span>
																		<a class="cou-tit-txt" title="${childNode.name}"  href="javascript:livePlay(${childNode.nodeId})">${childNode.name}</a>
																	</div>
																</li>
															</#if>
														</#list>
													</ol>
												</li>
											</#if>
											<!--如果父节点不是目录-->
											<#if parentNode.nodeType!=0>
												<!--set直播结束时间的时间格式-->
												<!--开始时间小于当前时间结束时间大于当前时间 为正在直播-->
												<#if parentNode.liveBeginTime?long lt .now?long && parentNode.liveEndTime?long gt .now?long>

													<li class="lh-menu-second">
														<div class="l-m-stitle clearfix">
                                                                <span class="fr">
                                                                        <a class="cou-kscp" href="javascript:livePlay(${parentNode.nodeId})" title="进入直播">进入直播</a>
                                                                </span>
															<span class="fr mr20">
                                                                    <img src="/static/qdxwx/img/live-ing.gif" width="100%" height="100%" class="vam disIb">
                                                                </span>
															<a class="cou-tit-txt" href="javascript:livePlay(${parentNode.nodeId})" title="${parentNode.name}" >${parentNode.name}</a>
														</div>
													</li>
												</#if>
												<!--开始时间大于当前时间 为未开始直播-->
												<#if parentNode.liveBeginTime?long gt .now?long>
													<li class="lh-menu-second">
														<div class="l-m-stitle clearfix">
                                                            <span class="fr">

                                                            <#if (.now?long+900000) < parentNode.liveBeginTime?long >
																<a  class="cou-kscp gmkc" href="javascript:void(0)" title="未开始">&nbsp;未&nbsp;开&nbsp;始</a><!--点击弹出提示 开播之前15分钟可以进入-->
															<#else>
															<a class="cou-kscp" href="javascript:livePlay(${parentNode.nodeId})" title="马上开始">马上开始</a><!--开播之前15分钟后按钮变色-->
															</#if>
                                                            </span>
															<span class="fr mr20">
                                                                <tt class="vam fsize12 f-fM c-master">
                                                                	${parentNode.liveBeginTime?string('yyyy-MM-dd HH:mm:ss')}&nbsp;~&nbsp;${parentNode.liveEndTime?string('yyyy-MM-dd HH:mm:ss')}
                                                                </tt>
                                                            </span>
															<a class="cou-tit-txt" title="${parentNode.name}" onclick="" href="javascript:livePlay(${parentNode.nodeId})">${parentNode.name}</a>
														</div>
													</li>
												</#if>
												<!--结束时间大于当前时间 为结束直播-->

												<#if parentNode.liveEndTime?long lt .now?long>
													<li class="lh-menu-second">
														<div class="l-m-stitle clearfix">
                                                            <span class="fr">
                                                                <a class="cou-kscp" href="javascript:livePlay(${parentNode.nodeId})" title="查看回放">查看回放</a>
                                                            </span>
															<span class="fr mr20">
                                                                <tt class="vam fsize12 f-fM c-666">
                                                                    ${parentNode.liveBeginTime?string('yyyy-MM-dd HH:mm:ss')}&nbsp;~&nbsp;${parentNode.liveEndTime?string('yyyy-MM-dd HH:mm:ss')}
                                                                </tt>
                                                            </span>
															<a class="cou-tit-txt" title="${parentNode.name}" href="javascript:livePlay(${parentNode.nodeId})">${parentNode.name}</a>
														</div>
													</li>
												</#if>
											</#if>
										</#list>
									</ul>
								</menu>
							</#if>
							</div>
							<div id="liveComment" style="display:none">
								<div class="mt20 commentHtml" >
								</div>
							</div>
						</article>
					</div>
				</section>
			</article>
			<aside class="fl w30 liveInfoRight">
				<div class="i-box">
					<div>
						<section class="c-infor-tabTitle c-tab-title">
							<span>直播主讲讲师</span>
						</section>
						<section class="stud-act-list">
							<#list teacherList as tea>
								<ul style="height: auto;">
									<li>
										<div class="u-face">
											<a href="/teacher/view/${tea.id}.html">
													<#if tea.avatar??>
														<img src="${staticSite}${tea.avatar }" width="50" height="50" alt="">
													<#else>
														<img src="/static/qdxwx/img/avatar-boy.gif" width="50" height="50" alt="">
													</#if>
											</a>
										</div>
										<section class="hLh30 txtOf">
											<a class="c-333 fsize16 fl" href="/teacher/view/${tea.id}.html">${tea.name }</a>
										</section>
										<section class="hLh20 txtOf">
											<span class="c-999">${tea.education }</span>
										</section>
									</li>
								</ul>
							</#list>
						</section>
					</div>
				</div>
				<div class="i-box mt20">
					<div >
						<section class="c-infor-tabTitle c-tab-title">
							<span>学过此课的人（${learnedUserCount}）</span>
						</section>
						<section class="no-data-wrap">
							<#if learnedUsers??>
								<section class="buy-cin-list">
									<#list learnedUsers as user>
										<span title="${user.userName}"><img alt="" src="${staticSite}${user.avatar}"><tt class="c-999">${user.userName}</tt></span>
									</#list>
								</section>
							<#else>
								<section class="no-data-wrap">
									<em class="icon30 no-data-ico">&nbsp;</em> <span class="c-666 fsize14 ml10 vam">没有相关数据，小编正在整理中...</span>
								</section>
							</#if>
						</section>
					</div>
				</div>
				<div class="i-box mt20">
					<div>
						<section class="c-infor-tabTitle c-tab-title">
							<span>猜你想学</span>
						</section>
						<#if courseList??>
							<section class="course-r-list">
								<ol>
									<#list courseList as item>
										<li>
											<aside class="course-r-pic">
												<a href="/course/view/${item.courseId}.html" title="">
														<#if item.cover?? && item.cover!=''>
															<img alt="" src="${staticSite}${item.cover}" />
														<#else >
															<img alt="" src="/static/qdxwx/img/coures.gif" />
														</#if>
												</a>
											</aside>
											<section class="hLh20 txtOf">
												<a href="/course/view/${item.courseId}.html" class="c-333 fsize16">${item.courseName}</a>
											</section>
											<section class="hLh20 mt5 txtOf">
													<span class="c-999">讲师：
													 <#if item.teacherList?? && (item.teacherList?size>0)>
														<#list item.teacherList as teacher>
															${teacher.name}&nbsp;&nbsp;
														</#list>
													</#if>
													</span>
											</section>
											<section class="hLh20 txtOf">
												<span class="c-master">${item.buyCount }人</span>
											</section>
										</li>
									</#list>
								</ol>
							</section>
							<#else>
						<section class="no-data-wrap">
								<em class="icon30 no-data-ico">&nbsp;</em> <span class="c-666 fsize14 ml10 vam">没有相关数据，小编正在整理中...</span>
							</section>
						</#if>
					</div>
				</div>
			</aside>
		</div>
	</div>
</div>
<input type="hidden" id="otherId" value="${course.courseId}"/>
</#assign>
<#include "../layouts/layout.ftl">